﻿@model RestaurantClassLibrary.Reservation

@{
    ViewBag.Title = "Change Reservation Details";
}

<h2>Change Reservation Details</h2>

<h3 style="color:red">@ViewBag.Message</h3><br />

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Reservation</legend>

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.Date)

        @*<div class="editor-label">
            @Html.LabelFor(model => model.Date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Date)
        </div>*@

        <div class="editor-label">
            @Html.LabelFor(model => model.Seats)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Seats)
            @Html.ValidationMessageFor(model => model.Seats)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PhoneNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PhoneNumber)
            @Html.ValidationMessageFor(model => model.PhoneNumber)
        </div>

        <p>
            <input type="submit" value="Save Changes" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Don't Save Changes", "Details", new { id = @Model.ID })
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")

}
